
import Head from 'next/head'

<Head>
  <script>
    {
      `(function() {
         var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?e60fb290e204e04c5cb6f79b0ac1e697";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
       })();`
    }
  </script>
</Head>

![LangChain](https://pica.zhimg.com/50/v2-56e8bbb52aa271012541c1fe1ceb11a2_r.gif)





AWS S3 文件[#](#aws-s3-file "标题永久链接")
===================================

> 
> [Amazon 简单存储服务（Amazon S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders) 是一种对象存储服务。
> 
> 
> 

> 
> [AWS S3 存储桶](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingBucket)
> 
> 
> 

这涵盖了如何从 `AWS S3 文件` 对象中加载文档对象的内容。

```python
from langchain.document_loaders import S3FileLoader

```

```python
#!pip install boto3

```

```python
loader = S3FileLoader("testing-hwc", "fake.docx")

```

```python
loader.load()

```

```python
[Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpxvave6wl/fake.docx'}, lookup_index=0)]

```

